{% extends 'mobile/base.html '%}
{% load static from static %}

{% block mainbody %}
	<!--头部-->
	<header>
		<div class="header">
			<h1>提交订单</h1>
			<a href="javascript:window.history.back();" class="return"><i></i></a>
		</div>
	</header>

	<!--内容区-->
	<article class="main-container add-product">

		<!--产品-->
		<div class="list-content cartlist order-Pro">
			<ul>
				{% for vo in request.session.mobile_cartlist.values %}
				<li class="line">
					<a href="#"><div class="pro-img"><img src="{% static 'uploads/product/' %}{{vo.cover_pic}}" alt=""></div></a>
					<div class="pro-con"><h3>{{vo.name}}</h3><b>￥{{vo.price}}</b>&times;{{vo.num}}</div>
				</li>
				{% endfor %}
			</ul>
		</div>



		<!--支付方式-->
		<div class="order-Delivery line" id="orderPays">
			<p>支付方式</p>
			<ol class="FilterContentList">
			</ol>
			<div class="list">
				<ul class="line">
					<li class="select" bank="4"><i class="icon-alipay"></i>支付宝支付<em class="icon-correct"></em></li>
					<li bank="1"><i class="icon-weixinpay"></i>微信支付<em class="icon-correct"></em></li>
				</ul>
			</div>
		</div>

		<br><br>

	</article>

	<!--底部栏目-->
	<footer>
		<div class="button"><button onclick="doSubmit()">提交订单</button></div>
		<h4>实付款：¥{{request.session.mobile_total_money}}</h4>
	</footer>

{% endblock %}

{% block myjavascript %}
<script type="text/javascript">
	//支付方式上的单选按钮点击效果
	$("ul.line li").click(function(){
		$("ul.line li").removeClass("select");
		$(this).addClass("select");
	});

	//执行订单提交操作函数
	function doSubmit(){
		bid = $("ul.line li.select").attr("bank");//获取支付方式
		window.location.href="{% url 'mobile_doaddorders' %}?bank="+bid;
	}

</script>
{% endblock %}
